home *** CD-ROM | disk | FTP | other *** search
- /*
- * The original copyright owners of the accompanying source code files have
- * agreed to place such code into the public domain. Accordingly, anyone
- * who receives or obtains a copy of such source code is freely entitled to
- * reproduce, use and otherwise exploit such code (including the right to
- * make derivative works), at his/her own risk and expense, without any
- * obligation or liability to the original copyright owners.
- *
- * We would appreciate (but do not require) that the following message be
- * included in any derivative works:
- *
- * "Portions of this program were developed by Peter Broadwell, Rob Myers
- * and Robin Schaufler while working in Silicon Valley."
- *
- * The accompanying source code files and related documentation materials
- * are distributed on an "AS IS" basis, without any warranties or
- * guarantees of any kind. All implied warranties, including the implied
- * warranties of merchantability and of fitness for any particular purpose,
- * are expressly disclaimed.
- */
- typedef struct {
- panel base;
- int flags;
- rectangle clamp; /* display coordinate system clamps on hit input */
- rectangle world; /* world coordinate system for xVal and yVal */
- int *xVal, *yVal; /* address of x and y Values, to be read and stuffed */
- Object tracker;
- } valuator;
-
- typedef struct {
- panel base;
- int flags;
- rectangle clamp; /* display coordinate system clamps on hit input */
- rectanglef world; /* world coordinate system for xVal and yVal */
- Coord *xVal, *yVal; /* address of x and y Values, to be read and stuffed */
- Object tracker;
- } valuatorf;
-
- typedef struct {
- panel base;
- int flags;
- rectangle clamp; /* display coordinate system clamps on hit input */
- rectangle world; /* world coordinate system for delta x and y values */
- int *xVal, *yVal; /* address of x and y Values, to be read and stuffed */
- rectangle limits; /* world coordinate limits for xVal and yVal */
- } valdelta;
-
- typedef struct {
- panel base;
- int flags;
- rectangle clamp; /* display coordinate system clamps on hit input */
- rectanglef world; /* world coordinate system for delta x and y values */
- Coord *xVal, *yVal; /* address of x and y Values, to be read and stuffed */
- rectanglef limits; /* world coordinate limits for xVal and yVal */
- } valdeltaf;
-
- typedef struct {
- panel base;
- int flags;
- rectangle clamp; /* display coordinate system clamps on hit input */
- rectangle world; /* world coordinate system for x and y values */
- point2d val; /* current x and y value */
- inst *receiver; /* object to receive valuator coord update message */
- int selector; /* application's message to receive updating point */
- int reset; /* AUTORESET or NOAUTORESET to origin on pen up */
- Object tracker;
- } valmesg;
-
- typedef struct {
- panel base;
- int flags;
- rectangle clamp; /* display coordinate system clamps on hit input */
- rectanglef world; /* world coordinate system for x and y values */
- point2df val; /* current x and y value */
- inst *receiver; /* object to receive valuator coord update message */
- int selector; /* application's message to receive updating point */
- int reset; /* AUTORESET or NOAUTORESET to origin on pen up */
- Object tracker;
- } valmesgf;
-
- typedef struct {
- panel base;
- int flags;
- rectangle clamp; /* display coordinate system clamps on hit input */
- rectangle world; /* world coordinate system for x and y values */
- Object display;
- } valhue;
-
- typedef struct {
- panel base;
- int flags;
- rectangle clamp; /* display coordinate system clamps on hit input */
- rectangle world; /* world coordinate system for x and y values */
- Object display;
- } valval;
-
-
- #define MAXHUE 256
- #define MAXSAT 256
- #define MAXVAL 256
-
- #define NOAUTORESET 0
- #define AUTORESET 1 /* automatically reset value to 0,0 on pen up */
-
- #define CLIPOUT 0x01 /* ignore input points outside clamping range */
-